package com.mage.controller;

import org.apache.commons.lang3.time.DateUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {

    @RequestMapping("")
    public String index(Model model) throws Exception {
        model.addAttribute("name", null); // 字符串
        model.addAttribute("wight", 160.8f); // 浮点型
        model.addAttribute("money", 10977887989.8756d); // 双精度
        model.addAttribute("isMale", true);
        model.addAttribute("birthday", DateUtils.parseDate("1987-10-10 12:13:12", "yyyy-MM-dd HH:mm:ss"));
        return "index";
    }

}
